﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MpSoft.Web.AdminCP.Controls.Modules
{
    public partial class ContentLanguage : System.Web.UI.UserControl
    {
        #region Method

        private void BindControl()
        {
            InfoSEO.NameClientID = txtName.ClientID;
        }

        #endregion

        #region Event

        protected void Page_Load(object sender, EventArgs e)
        {
            BindControl();    
        }

        #endregion

        #region Properties

        public string Language { set { hdLanguage.Value = value; } get { return hdLanguage.Value; } }
        public string Name { get { return txtName.Text; } set { txtName.Text = value; } }
        public string Description { get { return txtDescription.Text; } set { txtDescription.Text = value; } }
        public string Content { get { return ckContent.Text; } set { ckContent.Text = value; } }
        public string MetaTitle { set { InfoSEO.MetaTitle = value; } get { return InfoSEO.MetaTitle; } }
        public string MetaKeyWord { set { InfoSEO.MetaKeyword = value; } get { return InfoSEO.MetaKeyword; } }
        public string MetaDescription { set { InfoSEO.MetaDescription = value; } get { return InfoSEO.MetaDescription; } }
        public string SeName { set { InfoSEO.SeName = value; } get { return InfoSEO.SeName; } }
        public bool HideDescription { set; get; }
        public bool HideContent { set; get; }
        public bool NameNotNull { set { if (value) txtName.Attributes.Add("data-rule-required", "true"); } }
        public bool DescriptionNotNull { set { if (value) txtDescription.Attributes.Add("data-rule-required", "true"); } }

        #endregion
    }
}